package me.zhengjie.wechat.service;

import me.zhengjie.wechat.domain.WechatCode;
import me.zhengjie.wechat.service.dto.WechatCodeDTO;
import me.zhengjie.wechat.service.dto.WechatCodeQueryCriteria;
import org.springframework.data.domain.Pageable;
import java.util.Map;
import java.util.List;
import java.io.IOException;
import javax.servlet.http.HttpServletResponse;

/**
* @author Jiang yunxiao
* @date 2019-11-10
*/
public interface WechatCodeService {

    /**
    * 查询数据分页
    * @param criteria 条件参数
    * @param pageable 分页参数
    * @return Map<String,Object>
    */
    Map<String,Object> queryAll(WechatCodeQueryCriteria criteria, Pageable pageable);

    /**
    * 查询所有数据不分页
    * @param criteria 条件参数
    * @return List<WechatCodeDTO>
    */
    List<WechatCodeDTO> queryAll(WechatCodeQueryCriteria criteria);

    /**
     * 根据ID查询
     * @param id ID
     * @return WechatCodeDTO
     */
    WechatCodeDTO findById(Long id);

    WechatCodeDTO create(WechatCode resources);

    void update(WechatCode resources);

    void delete(Long id);

    void download(List<WechatCodeDTO> all, HttpServletResponse response) throws IOException;

}